<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>DOM Manipulation - QuerySelector</title>
</head>
<body>
	<header>
	<nav id="main-nav">
		<div>
		   <div>text1</div>
		</div>
		
		<div>
			<div>test2</div>
		</div>
	
		<div>
			<span>test3</span>
		</div>
	</nav>
	</header>
	
	<script>
	
	var MainNav=document.querySelector("#main-nav");
	var navItem=document.querySelectorAll("#main-nav > div > div ");
	for(var i = 0 ; i < navItem.length ; i++ )
	{
		alert(navItem[i].innerHTML)
	}
	
	
	</script>
</body>
</html>